import com.casework.auth.AuthUser
import com.casework.auth.AuthUserRole
import com.casework.auth.Role
import com.casework.*
import com.casework.auth.Company

class BootStrap {

    def springSecurityService
    def searchableService

    def parseXmlService
    def init = { servletContext ->
        if (Role.count() < 2) {
            def company = new Company(name: 'Competition Rx', contact:'Alex',
                    email:'something@rx.com', phoneNumber: '5957672')


            def adminRole = new Role(authority: 'ROLE_ADMIN').save(flush: true)
            def userRole = new Role(authority: 'ROLE_USER').save(flush: true)
            String password = springSecurityService.encodePassword('password')

            def testUser = new AuthUser(username: 'editor', email:'something', enabled: true, password: password)
            def admin = new AuthUser(username: 'admin', email:'something', enabled: true, password: password)
            company.addToEmployees(testUser)
            company.addToEmployees(admin)
            company.save(flush:true)
            admin.save(flush: true)
            testUser.save(flush: true)
            AuthUserRole.create admin, adminRole, true
            AuthUserRole.create testUser, userRole, true

            assert AuthUser.count() >= 2
            assert Role.count() == 2
            assert AuthUserRole.count() >= 2
        }
        searchableService.reindex()
    }

    def destroy = {
    }

    private void addDealType() {
        if (DealType.findByDealType('Acq') == null) {
            new DealType(dealType: 'Acq').save(flush: true)
            new DealType(dealType: 'Acq (PE backer)').save(flush: true)
            new DealType(dealType: 'Acq (Public Bid)').save(flush: true)
            new DealType(dealType: 'Full merger').save(flush: true)
            new DealType(dealType: 'New JV').save(flush: true)
            new DealType(dealType: 'PE').save(flush: true)
            new DealType(dealType: 'full merger').save(flush: true)
            new DealType(dealType: 'spin off').save(flush: true)
        }
    }

    private void addProperties() {
        if (Property.count() == 0) {
            def term = new Property(property: 'term').save(failOnError: true, fluah: true)
            def purchaserCriteria = new Property(property: 'purchaserCriteria').save(failOnError: true, fluah: true)
            def clusterSale = new Property(property: 'clusterSale').save(failOnError: true, fluah: true)
            def alternativeRemedy = new Property(property: 'alternativeRemedy').save(failOnError: true, fluah: true)
            def scopeOfDivestment = new Property(property: 'scopeOfDivestment').save(failOnError: true, fluah: true)
            def tangibleFixedAsset = new Property(property: 'tangibleFixedAsset').save(failOnError: true, fluah: true)
            def inteangibleFixedAsset = new Property(property: 'intangibleFixedAsset').save(failOnError: true, fluah: true)
            def currentAsset = new Property(property: 'currentAsset').save(failOnError: true, fluah: true)
            def personnel = new Property(property: 'personnel').save(failOnError: true, fluah: true)
            def transitionalService = new Property(property: 'transitionalService').save(failOnError: true, fluah: true)

            def m = new MeasureClassification(measureClassification1: 'Structural',
                    measureClassification2: 'Other Structural Commitment',
                    measureClassification3: 'Commitments to exit from JV'
            )
            m.save(failOnError: true, fluah: true)
            ClassificationProperty.create(purchaserCriteria, m, true)
            ClassificationProperty.create(clusterSale, m, true)
            ClassificationProperty.create(alternativeRemedy, m, true)
            ClassificationProperty.create(scopeOfDivestment, m, true)

            m = new MeasureClassification(measureClassification1: 'Structural',
                    measureClassification2: 'Transfer of a market position',
                    measureClassification3: 'Divestiture of a business unit carved out from a company structure'
            )
            m.save(failOnError: true, fluah: true)
            ClassificationProperty.create(purchaserCriteria, m, true)
            ClassificationProperty.create(clusterSale, m, true)
            ClassificationProperty.create(alternativeRemedy, m, true)
            ClassificationProperty.create(scopeOfDivestment, m, true)
            ClassificationProperty.create(tangibleFixedAsset, m, true)
            ClassificationProperty.create(inteangibleFixedAsset, m, true)
            ClassificationProperty.create(currentAsset, m, true)
            ClassificationProperty.create(personnel, m, true)
            ClassificationProperty.create(transitionalService, m, true)

            m = new MeasureClassification(measureClassification1: 'Structural',
                    measureClassification2: 'Transfer of a market position',
                    measureClassification3: 'Divestiture of a controlling stake in a viable standalone business'
            )
            m.save(failOnError: true, fluah: true)
            ClassificationProperty.create(purchaserCriteria, m, true)
            ClassificationProperty.create(clusterSale, m, true)
            ClassificationProperty.create(alternativeRemedy, m, true)
            ClassificationProperty.create(scopeOfDivestment, m, true)
            ClassificationProperty.create(transitionalService, m, true)

            m = new MeasureClassification(measureClassification1: 'Structural',
                    measureClassification2: 'Transfer of a market position',
                    measureClassification3: 'Divestiture of assets package'
            )
            m.save(failOnError: true, fluah: true)
            ClassificationProperty.create(purchaserCriteria, m, true)
            ClassificationProperty.create(clusterSale, m, true)
            ClassificationProperty.create(alternativeRemedy, m, true)
            ClassificationProperty.create(scopeOfDivestment, m, true)
            ClassificationProperty.create(tangibleFixedAsset, m, true)
            ClassificationProperty.create(inteangibleFixedAsset, m, true)
            ClassificationProperty.create(currentAsset, m, true)
            ClassificationProperty.create(personnel, m, true)
            ClassificationProperty.create(transitionalService, m, true)

            //5
            m = new MeasureClassification(measureClassification1: 'Structural',
                    measureClassification2: 'Transfer of a market position',
                    measureClassification3: 'Divestiture or grant of long-term licence'
            )
            m.save(failOnError: true, fluah: true)
            ClassificationProperty.create(purchaserCriteria, m, true)
            ClassificationProperty.create(clusterSale, m, true)
            ClassificationProperty.create(alternativeRemedy, m, true)
            ClassificationProperty.create(scopeOfDivestment, m, true)

            //6
            m = new MeasureClassification(measureClassification1: 'Behavioural',
                    measureClassification2: 'Commitment to grant access',
                    measureClassification3: 'Granting of access to infrastructure'
            )
            m.save(failOnError: true, fluah: true)
            ClassificationProperty.create(term, m, true)

            //7
            m = new MeasureClassification(measureClassification1: 'Behavioural',
                    measureClassification2: 'Commitment to grant access',
                    measureClassification3: 'Granting of access to technology'
            )
            m.save(failOnError: true, fluah: true)
            ClassificationProperty.create(term, m, true)

            //8
            new MeasureClassification(measureClassification1: 'Behavioural',
                    measureClassification2: 'Other Behavioural Commitment',
                    measureClassification3: 'Other behavioural'
            ).save(failOnError: true, fluah: true)

            //9
            new MeasureClassification(measureClassification1: 'Behavioural',
                    measureClassification2: 'Other Behavioural Commitment',
                    measureClassification3: 'Other behavioural - governance provision'
            ).save(failOnError: true, fluah: true)

            //10
            new MeasureClassification(measureClassification1: 'Behavioural',
                    measureClassification2: 'Other Behavioural Commitment',
                    measureClassification3: 'Other behavioural - IP / regulatory related'
            ).save(failOnError: true, fluah: true)

            //11
            new MeasureClassification(measureClassification1: 'Behavioural',
                    measureClassification2: 'Other Behavioural Commitment',
                    measureClassification3: 'Other behavioural - selling or supply agreements'
            ).save(failOnError: true, fluah: true)

            //12
            m = new MeasureClassification(measureClassification1: 'Structural',
                    measureClassification2: 'Other Structural Commitment',
                    measureClassification3: 'Other structural'
            )
            m.save(failOnError: true, fluah: true)
            ClassificationProperty.create(purchaserCriteria, m, true)
            ClassificationProperty.create(clusterSale, m, true)
            ClassificationProperty.create(alternativeRemedy, m, true)
            ClassificationProperty.create(scopeOfDivestment, m, true)
        }
    }

    private void addNaceCategories() {
        if (NaceCategory.findByShortDescription('Accommodation') == null) {
            new NaceCategory(shortDescription: 'Accommodation').save(flush: true, failOnError: true)
            new NaceCategory(shortDescription: 'Activities of extraterritorial organisations and bodies').save(flush: true)
            new NaceCategory(shortDescription: 'Activities of households as employers; undifferentiated goods - and services - producing activities of households for own use').save(flush: true)
            new NaceCategory(shortDescription: 'Agriculture').save(flush: true)
            new NaceCategory(shortDescription: 'Basic Industries').save(flush: true)
            new NaceCategory(shortDescription: 'Construction').save(flush: true)
            new NaceCategory(shortDescription: 'Education').save(flush: true)
            new NaceCategory(shortDescription: 'Energy').save(flush: true)
            new NaceCategory(shortDescription: 'Environmental').save(flush: true)
            new NaceCategory(shortDescription: 'Financial Services').save(flush: true)
            new NaceCategory(shortDescription: 'Food and beverage service activities').save(flush: true)
            new NaceCategory(shortDescription: 'Human health and social work activities              ').save(flush: true)
            new NaceCategory(shortDescription: 'Information, Communication and Media').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing - ').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing - Automotive').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing - Building products').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing - Chemicals').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing - Clothing             ').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing - Food & Drink').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing - Industrial machinery').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing - Paper').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing - Pharmaceuticals').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing - Printng             ').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing - Textiles').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing - Tobacco').save(flush: true)
            new NaceCategory(shortDescription: 'Manufacturing - Wood').save(flush: true)
            new NaceCategory(shortDescription: 'Other Services').save(flush: true)
            new NaceCategory(shortDescription: 'Other services activities').save(flush: true)
            new NaceCategory(shortDescription: 'Public administration and defence; compulsory social security').save(flush: true)
            new NaceCategory(shortDescription: 'Real estate activities').save(flush: true)
            new NaceCategory(shortDescription: 'Retail').save(flush: true)
            new NaceCategory(shortDescription: 'Short').save(flush: true)
            new NaceCategory(shortDescription: 'Transport').save(flush: true)
            new NaceCategory(shortDescription: 'Wholesale').save(flush: true)
        }
    }

    private void addFirms() {

        if (Firm.findByName('ABBOTT') == null) {
            new Firm(name: "ABBOTT").save(flush: true)
            new Firm(name: "ABF").save(flush: true)
            new Firm(name: "ABN AMRO ASSETS").save(flush: true)
            new Firm(name: "ADEG").save(flush: true)
            new Firm(name: "ADTRANZ").save(flush: true)
            new Firm(name: "ADVANTA").save(flush: true)
            new Firm(name: "AGA").save(flush: true)
            new Firm(name: "AGFA NDT").save(flush: true)
            new Firm(name: "AGILENT").save(flush: true)
            new Firm(name: "AHLSTROM").save(flush: true)
            new Firm(name: "AIR FRANCE").save(flush: true)
            new Firm(name: "AIR LIQUIDE").save(flush: true)
            new Firm(name: "AKER KVAERNER").save(flush: true)
            new Firm(name: "AKZO NOBEL").save(flush: true)
            new Firm(name: "ALCAN").save(flush: true)
            new Firm(name: "ALCATEL").save(flush: true)
            new Firm(name: "ALCATEL ALENIA SPACE & TELESPAZIO").save(flush: true)
            new Firm(name: "ALCOA").save(flush: true)
            new Firm(name: "ALCON").save(flush: true)
            new Firm(name: "ALLIANZ").save(flush: true)
            new Firm(name: "ALLIED DOMECQ").save(flush: true)
            new Firm(name: "ALTADIS").save(flush: true)
            new Firm(name: "ALUSUISSE").save(flush: true)
            new Firm(name: "AMCOR").save(flush: true)
            new Firm(name: "AMER").save(flush: true)
            new Firm(name: "AMERICAN CYANAMID (AHP)").save(flush: true)
            new Firm(name: "AMERICAN NATIONAL CAN").save(flush: true)
            new Firm(name: "AMORA- MAILLE").save(flush: true)
            new Firm(name: "ANTALIS").save(flush: true)
            new Firm(name: "AOL").save(flush: true)
            new Firm(name: "APC").save(flush: true)
            new Firm(name: "APOLLO").save(flush: true)
            new Firm(name: "APRILIA").save(flush: true)
            new Firm(name: "APSA").save(flush: true)
            new Firm(name: "APW").save(flush: true)
            new Firm(name: "ARCELOR").save(flush: true)
            new Firm(name: "AREVA").save(flush: true)
            new Firm(name: "ARJOWIGGINS").save(flush: true)
            new Firm(name: "ARRIVA").save(flush: true)
            new Firm(name: "ARSENAL").save(flush: true)
            new Firm(name: "ASTRA ZENECA").save(flush: true)
            new Firm(name: "ASTRIUM").save(flush: true)
            new Firm(name: "AUSTRIAN AIRLINES").save(flush: true)
            new Firm(name: "AVENTIS").save(flush: true)
            new Firm(name: "AVENTIS CROP SCIENCE").save(flush: true)
            new Firm(name: "AXALTO").save(flush: true)
            new Firm(name: "BAKELITE").save(flush: true)
            new Firm(name: "BARILLA").save(flush: true)
            new Firm(name: "BARR").save(flush: true)
            new Firm(name: "BASF").save(flush: true)
            new Firm(name: "BAT").save(flush: true)
            new Firm(name: "BAYER").save(flush: true)
            new Firm(name: "BAYER HEALTHCARE").save(flush: true)
            new Firm(name: "BERTELSMANN -SPRINGER").save(flush: true)
            new Firm(name: "BESTFOODS").save(flush: true)
            new Firm(name: "BILFINGER BERGER").save(flush: true)
            new Firm(name: "BLUE CIRCLE").save(flush: true)
            new Firm(name: "BMG MUSIC PUBLISHING").save(flush: true)
            new Firm(name: "BNP PARIBAS").save(flush: true)
            new Firm(name: "BOC").save(flush: true)
            new Firm(name: "BOMBARDIER").save(flush: true)
            new Firm(name: "BONNIER (BOOKS)").save(flush: true)
            new Firm(name: "BOSCH").save(flush: true)
            new Firm(name: "BP").save(flush: true)
            new Firm(name: "BPL").save(flush: true)
            new Firm(name: "BRITISH ENERGY").save(flush: true)
            new Firm(name: "BSN GLASSPACK (4064)").save(flush: true)
            new Firm(name: "BT").save(flush: true)
            new Firm(name: "BUHRMANN").save(flush: true)
            new Firm(name: "CADBURY").save(flush: true)
            new Firm(name: "CAEMI").save(flush: true)
            new Firm(name: "CAJASTUR").save(flush: true)
            new Firm(name: "CAMPINA").save(flush: true)
            new Firm(name: "CANAL+").save(flush: true)
            new Firm(name: "CANDOVER").save(flush: true)
            new Firm(name: "CARREFOUR").save(flush: true)
            new Firm(name: "CEMENTBOUW").save(flush: true)
            new Firm(name: "CHIPS").save(flush: true)
            new Firm(name: "CIBA").save(flush: true)
            new Firm(name: "CINVEN").save(flush: true)
            new Firm(name: "CISCO").save(flush: true)
            new Firm(name: "CLEANAWAY").save(flush: true)
            new Firm(name: "CLICKAIR").save(flush: true)
            new Firm(name: "COGNIS").save(flush: true)
            new Firm(name: "COMPAGNIE DE SAINT- GOBAIN").save(flush: true)
            new Firm(name: "CONOCOPHILLIPS").save(flush: true)
            new Firm(name: "CONSTANTIA").save(flush: true)
            new Firm(name: "CONTINENTAL").save(flush: true)
            new Firm(name: "CONVATEC").save(flush: true)
            new Firm(name: "COOKSON").save(flush: true)
            new Firm(name: "COURTAULDS").save(flush: true)
            new Firm(name: "CP SHIPS").save(flush: true)
            new Firm(name: "CVC").save(flush: true)
            new Firm(name: "CVRD").save(flush: true)
            new Firm(name: "CYTEC").save(flush: true)
            new Firm(name: "DAIMLER CHRYSLER").save(flush: true)
            new Firm(name: "DANONE").save(flush: true)
            new Firm(name: "DANONE BISCUITS").save(flush: true)
            new Firm(name: "DASA").save(flush: true)
            new Firm(name: "DEA").save(flush: true)
            new Firm(name: "DEGUSSA").save(flush: true)
            new Firm(name: "DEMATIC").save(flush: true)
            new Firm(name: "DEUTSCHE BAHN").save(flush: true)
            new Firm(name: "DEUTSCHE TELEKOM").save(flush: true)
            new Firm(name: "DFDS").save(flush: true)
            new Firm(name: "DIAGEO").save(flush: true)
            new Firm(name: "DIGITA").save(flush: true)
            new Firm(name: "DONG").save(flush: true)
            new Firm(name: "DOW CHEMICAL").save(flush: true)
            new Firm(name: "DRESDNER").save(flush: true)
            new Firm(name: "DR GERWERK").save(flush: true)
            new Firm(name: "DSM").save(flush: true)
            new Firm(name: "DSP").save(flush: true)
            new Firm(name: "DYNO").save(flush: true)
            new Firm(name: "E.ON").save(flush: true)
            new Firm(name: "EADS").save(flush: true)
            new Firm(name: "EBV").save(flush: true)
            new Firm(name: "ECO").save(flush: true)
            new Firm(name: "EDF").save(flush: true)
            new Firm(name: "EDIZIONE").save(flush: true)
            new Firm(name: "EDP").save(flush: true)
            new Firm(name: "EGMONT").save(flush: true)
            new Firm(name: "ELF AQUITAINE").save(flush: true)
            new Firm(name: "ELSAM").save(flush: true)
            new Firm(name: "ENBW").save(flush: true)
            new Firm(name: "ENERGI E2").save(flush: true)
            new Firm(name: "ENERGIE ALLIANZ").save(flush: true)
            new Firm(name: "ENGLISH WELSH & SCOTTISH RAILWAY HOLDINGS (EWS)").save(flush: true)
            new Firm(name: "ENI").save(flush: true)
            new Firm(name: "ENODIS").save(flush: true)
            new Firm(name: "ERMEWA").save(flush: true)
            new Firm(name: "ESAT").save(flush: true)
            new Firm(name: "ESSENT").save(flush: true)
            new Firm(name: "ETC JV (4064)").save(flush: true)
            new Firm(name: "EUROSTAR").save(flush: true)
            new Firm(name: "EUROWINGS").save(flush: true)
            new Firm(name: "EVRAZ").save(flush: true)
            new Firm(name: "EXXONMOBIL IBERIA").save(flush: true)
            new Firm(name: "FALCONBRIDGE").save(flush: true)
            new Firm(name: "FIAMM").save(flush: true)
            new Firm(name: "FINMECCANICA").save(flush: true)
            new Firm(name: "FIRST CHOICE").save(flush: true)
            new Firm(name: "FISHER SCIENTIFIC").save(flush: true)
            new Firm(name: "FORTIS").save(flush: true)
            new Firm(name: "FOSECO").save(flush: true)
            new Firm(name: "FRANCE TELECOM").save(flush: true)
            new Firm(name: "FRIESLAND").save(flush: true)
            new Firm(name: "GALP ENERGIA").save(flush: true)
            new Firm(name: "GAZ DE FRANCE").save(flush: true)
            new Firm(name: "GBI BUSINESS").save(flush: true)
            new Firm(name: "GBI UK").save(flush: true)
            new Firm(name: "GE").save(flush: true)
            new Firm(name: "GEMPLUS").save(flush: true)
            new Firm(name: "GENERALI").save(flush: true)
            new Firm(name: "GERLING").save(flush: true)
            new Firm(name: "GILLETTE").save(flush: true)
            new Firm(name: "GIMD").save(flush: true)
            new Firm(name: "GLAXO WELLCOME").save(flush: true)
            new Firm(name: "GROUP 4 FALCK").save(flush: true)
            new Firm(name: "GRUPO VILLAR MIR").save(flush: true)
            new Firm(name: "GUIDANT").save(flush: true)
            new Firm(name: "GVS").save(flush: true)
            new Firm(name: "HAGEMEYER").save(flush: true)
            new Firm(name: "HANIEL").save(flush: true)
            new Firm(name: "HEXAL").save(flush: true)
            new Firm(name: "HEXION").save(flush: true)
            new Firm(name: "HIDROELECTRICA DEL CANTABRICO").save(flush: true)
            new Firm(name: "HIGHVELD").save(flush: true)
            new Firm(name: "HOECHST").save(flush: true)
            new Firm(name: "HONEYWELL").save(flush: true)
            new Firm(name: "HUNTSMAN").save(flush: true)
            new Firm(name: "HYUNDAI MERCHANT MARINE").save(flush: true)
            new Firm(name: "IBERIA").save(flush: true)
            new Firm(name: "ICI").save(flush: true)
            new Firm(name: "IMPERIAL TOBACCO").save(flush: true)
            new Firm(name: "INA").save(flush: true)
            new Firm(name: "INCO").save(flush: true)
            new Firm(name: "INDUSTRI KAPITAL").save(flush: true)
            new Firm(name: "INDUSTRI KAPITAL (NORDKEM)").save(flush: true)
            new Firm(name: "INSTRUMENTARIUM").save(flush: true)
            new Firm(name: "INVERSIONES IBERSUIZAS").save(flush: true)
            new Firm(name: "IPIC").save(flush: true)
            new Firm(name: "J.M. HUBER PCC").save(flush: true)
            new Firm(name: "JCI").save(flush: true)
            new Firm(name: "JEFFERSON SMURFIT").save(flush: true)
            new Firm(name: "JOHNSON & JOHNSON").save(flush: true)
            new Firm(name: "JV").save(flush: true)
            new Firm(name: "JV (4064)").save(flush: true)
            new Firm(name: "JV (CVK)").save(flush: true)
            new Firm(name: "JV -PROJECT NICOLE").save(flush: true)
            new Firm(name: "KAMPS").save(flush: true)
            new Firm(name: "KAPPA").save(flush: true)
            new Firm(name: "KAR- TESS GROUP (HELLENIC BOTTLING)").save(flush: true)
            new Firm(name: "KEMIRA GROWHOW").save(flush: true)
            new Firm(name: "KLM").save(flush: true)
            new Firm(name: "KONICA").save(flush: true)
            new Firm(name: "KRAFT").save(flush: true)
            new Firm(name: "KRAFT FOODS").save(flush: true)
            new Firm(name: "KRONOSPAN").save(flush: true)
            new Firm(name: "LAFARGE").save(flush: true)
            new Firm(name: "LAGARDERE").save(flush: true)
            new Firm(name: "LAPORTE").save(flush: true)
            new Firm(name: "LCR").save(flush: true)
            new Firm(name: "LESAFFRE").save(flush: true)
            new Firm(name: "LIBRO").save(flush: true)
            new Firm(name: "LINDE").save(flush: true)
            new Firm(name: "LUFTHANSA").save(flush: true)
            new Firm(name: "LUVATA").save(flush: true)
            new Firm(name: "M- REAL ZANDERS REFLEX").save(flush: true)
            new Firm(name: "MAERSK").save(flush: true)
            new Firm(name: "MAN FERROSTAAL AG").save(flush: true)
            new Firm(name: "MANITOWOC").save(flush: true)
            new Firm(name: "MANNESMANN").save(flush: true)
            new Firm(name: "MAP").save(flush: true)
            new Firm(name: "MASTERFOODS").save(flush: true)
            new Firm(name: "MAV CARGO").save(flush: true)
            new Firm(name: "MAXIT").save(flush: true)
            new Firm(name: "MCE").save(flush: true)
            new Firm(name: "MESSER TARGETS").save(flush: true)
            new Firm(name: "METSO").save(flush: true)
            new Firm(name: "METS CORRUGATED").save(flush: true)
            new Firm(name: "METS-SERLA").save(flush: true)
            new Firm(name: "MINOLTA").save(flush: true)
            new Firm(name: "MITSUI").save(flush: true)
            new Firm(name: "MITTAL").save(flush: true)
            new Firm(name: "MMS").save(flush: true)
            new Firm(name: "MODO").save(flush: true)
            new Firm(name: "MOL").save(flush: true)
            new Firm(name: "MONSANTO").save(flush: true)
            new Firm(name: "MONSANTO'S SUNFLOWER SEED BUSINESS").save(flush: true)
            new Firm(name: "MONTEDISON- AUSIMONT").save(flush: true)
            new Firm(name: "MOULINEX").save(flush: true)
            new Firm(name: "NABISCO").save(flush: true)
            new Firm(name: "NATEXIS").save(flush: true)
            new Firm(name: "NCM").save(flush: true)
            new Firm(name: "NESTLE").save(flush: true)
            new Firm(name: "NEWS CORP").save(flush: true)
            new Firm(name: "NEWSCORP").save(flush: true)
            new Firm(name: "NORDBANKEN").save(flush: true)
            new Firm(name: "NORDIC CAPITAL").save(flush: true)
            new Firm(name: "NORFOLK").save(flush: true)
            new Firm(name: "NOVAR").save(flush: true)
            new Firm(name: "NOVARTIS").save(flush: true)
            new Firm(name: "NOVARTIS (Medical Nutrition Business)").save(flush: true)
            new Firm(name: "NUMICO").save(flush: true)
            new Firm(name: "NUON").save(flush: true)
            new Firm(name: "O2").save(flush: true)
            new Firm(name: "OLIVETTI").save(flush: true)
            new Firm(name: "OMYA").save(flush: true)
            new Firm(name: "ORANGE").save(flush: true)
            new Firm(name: "ORGANON BIOSCIENCES").save(flush: true)
            new Firm(name: "ORICA").save(flush: true)
            new Firm(name: "ORKLA").save(flush: true)
            new Firm(name: "OTTO").save(flush: true)
            new Firm(name: "OWENS CORNING").save(flush: true)
            new Firm(name: "OWENS-ILLINOIS").save(flush: true)
            new Firm(name: "P&G (European tissue business)").save(flush: true)
            new Firm(name: "PANASONIC").save(flush: true)
            new Firm(name: "PCM").save(flush: true)
            new Firm(name: "PECHINEY (II)").save(flush: true)
            new Firm(name: "PERNOD RICARD").save(flush: true)
            new Firm(name: "PERSTORP (II)").save(flush: true)
            new Firm(name: "PFIZER").save(flush: true)
            new Firm(name: "PFIZER CONSUMER HEALTHCARE").save(flush: true)
            new Firm(name: "PHARMACIA").save(flush: true)
            new Firm(name: "PHARMACIA & UPJOHN").save(flush: true)
            new Firm(name: "PHOENIX (4064)").save(flush: true)
            new Firm(name: "PIAGGIO").save(flush: true)
            new Firm(name: "PIRELLI").save(flush: true)
            new Firm(name: "POLESTAR").save(flush: true)
            new Firm(name: "PONL").save(flush: true)
            new Firm(name: "POST DANMARK A").save(flush: true)
            new Firm(name: "POSTEN AB").save(flush: true)
            new Firm(name: "POSTGIROT").save(flush: true)
            new Firm(name: "PREMIERE").save(flush: true)
            new Firm(name: "PREUSSAG").save(flush: true)
            new Firm(name: "PRIMONDO ASSETS").save(flush: true)
            new Firm(name: "PRISA").save(flush: true)
            new Firm(name: "PROCTER & GAMBLE").save(flush: true)
            new Firm(name: "PROMATECH").save(flush: true)
            new Firm(name: "PROMODES").save(flush: true)
            new Firm(name: "RAG").save(flush: true)
            new Firm(name: "RALSTON PURINA").save(flush: true)
            new Firm(name: "RANDSTAD").save(flush: true)
            new Firm(name: "RATIOPHARM").save(flush: true)
            new Firm(name: "RCA").save(flush: true)
            new Firm(name: "RECKITT BENCKISER").save(flush: true)
            new Firm(name: "REEMTSMA CIGARETTENFABRIKEN").save(flush: true)
            new Firm(name: "RENAULT V.I.").save(flush: true)
            new Firm(name: "RENOLIT").save(flush: true)
            new Firm(name: "REUTERS").save(flush: true)
            new Firm(name: "REUTERS GROUP").save(flush: true)
            new Firm(name: "REWE").save(flush: true)
            new Firm(name: "REXAM (PLM)").save(flush: true)
            new Firm(name: "REXEL").save(flush: true)
            new Firm(name: "REXROTH").save(flush: true)
            new Firm(name: "REYNOLDS").save(flush: true)
            new Firm(name: "RHONE - POULENC").save(flush: true)
            new Firm(name: "ROCHE (OTC BUSINESS)").save(flush: true)
            new Firm(name: "ROCHE VITAMINS").save(flush: true)
            new Firm(name: "ROYAL CANIN").save(flush: true)
            new Firm(name: "RWE").save(flush: true)
            new Firm(name: "SAINT GOBAIN VETROTEX").save(flush: true)
            new Firm(name: "SAINT LOUIS").save(flush: true)
            new Firm(name: "SALOMON").save(flush: true)
            new Firm(name: "SAMAS OFFICE SUPPLIES").save(flush: true)
            new Firm(name: "SANOFI- SYNTHELABO").save(flush: true)
            new Firm(name: "SANOFI-AVENTIS").save(flush: true)
            new Firm(name: "SANYO").save(flush: true)
            new Firm(name: "SARA LEE").save(flush: true)
            new Firm(name: "SARA LEE BODY CARE").save(flush: true)
            new Firm(name: "SCA").save(flush: true)
            new Firm(name: "SCA PACKAGING").save(flush: true)
            new Firm(name: "SCHERING- PLOUGH").save(flush: true)
            new Firm(name: "SCHNEIDER ELECTRIC").save(flush: true)
            new Firm(name: "SEAGRAM").save(flush: true)
            new Firm(name: "SEAGRAM SPIRITS").save(flush: true)
            new Firm(name: "SEB").save(flush: true)
            new Firm(name: "SECURICOR (4064)").save(flush: true)
            new Firm(name: "SEGEBEL").save(flush: true)
            new Firm(name: "SFR").save(flush: true)
            new Firm(name: "SHELL").save(flush: true)
            new Firm(name: "SIDEL").save(flush: true)
            new Firm(name: "SIEMENS").save(flush: true)
            new Firm(name: "SKANDINAVISK TOBAKSKOMPAGNI").save(flush: true)
            new Firm(name: "SLEC").save(flush: true)
            new Firm(name: "SMITHKLINE BEECHAM").save(flush: true)
            new Firm(name: "SN AIRHOLDING (BRUSSELS AIRLINES)").save(flush: true)
            new Firm(name: "SNCF").save(flush: true)
            new Firm(name: "SOCPRESSE (4064)").save(flush: true)
            new Firm(name: "SOLVAY").save(flush: true)
            new Firm(name: "SOLVAY PHARMACEUTICALS").save(flush: true)
            new Firm(name: "SONERA").save(flush: true)
            new Firm(name: "SONOCO").save(flush: true)
            new Firm(name: "SPPL").save(flush: true)
            new Firm(name: "SSL INTERNATIONAL").save(flush: true)
            new Firm(name: "STATOIL").save(flush: true)
            new Firm(name: "SUEZ").save(flush: true)
            new Firm(name: "SULZER TEXTIL").save(flush: true)
            new Firm(name: "SVEDALA").save(flush: true)
            new Firm(name: "SWISS").save(flush: true)
            new Firm(name: "SYNGENTA").save(flush: true)
            new Firm(name: "SYNGENTA CP").save(flush: true)
            new Firm(name: "SUDZUCKER").save(flush: true)
            new Firm(name: "T- MOBILE AUSTRIA").save(flush: true)
            new Firm(name: "T-MOBILE").save(flush: true)
            new Firm(name: "TALANX").save(flush: true)
            new Firm(name: "TANDBERG").save(flush: true)
            new Firm(name: "TDF").save(flush: true)
            new Firm(name: "TEIJIN").save(flush: true)
            new Firm(name: "TELE 2").save(flush: true)
            new Firm(name: "TELE.RING").save(flush: true)
            new Firm(name: "TELEF�NICA").save(flush: true)
            new Firm(name: "TELEKOM AUSTRIA").save(flush: true)
            new Firm(name: "TELEPIU").save(flush: true)
            new Firm(name: "TELERATE").save(flush: true)
            new Firm(name: "TELIA").save(flush: true)
            new Firm(name: "TETRA LAVAL").save(flush: true)
            new Firm(name: "TEVA").save(flush: true)
            new Firm(name: "THE COCA- COLA COMPANY").save(flush: true)
            new Firm(name: "THE POST OFFICE").save(flush: true)
            new Firm(name: "THERMO ELECTRON").save(flush: true)
            new Firm(name: "THOMSON").save(flush: true)
            new Firm(name: "THOMSON CORPORATION").save(flush: true)
            new Firm(name: "TIME WARNER").save(flush: true)
            new Firm(name: "TLP").save(flush: true)
            new Firm(name: "TNS").save(flush: true)
            new Firm(name: "TOSHIBA").save(flush: true)
            new Firm(name: "TOTAL").save(flush: true)
            new Firm(name: "TOTALFINA").save(flush: true)
            new Firm(name: "TOWERS PERRIN").save(flush: true)
            new Firm(name: "TPG").save(flush: true)
            new Firm(name: "TUI").save(flush: true)
            new Firm(name: "UCB- SURFACE SPECIALTIES").save(flush: true)
            new Firm(name: "UNILEVER").save(flush: true)
            new Firm(name: "UNION CARBIDE").save(flush: true)
            new Firm(name: "UNITED AIRLINES").save(flush: true)
            new Firm(name: "UNITED BISCUITS").save(flush: true)
            new Firm(name: "UNIVERSAL MUSIC GROUP").save(flush: true)
            new Firm(name: "URENCO").save(flush: true)
            new Firm(name: "US AIRWAYS").save(flush: true)
            new Firm(name: "V&S").save(flush: true)
            new Firm(name: "VA TECH").save(flush: true)
            new Firm(name: "VARIAN").save(flush: true)
            new Firm(name: "VATTENFALL").save(flush: true)
            new Firm(name: "VDO").save(flush: true)
            new Firm(name: "VEBA").save(flush: true)
            new Firm(name: "VEBA OEL").save(flush: true)
            new Firm(name: "VEDIOR").save(flush: true)
            new Firm(name: "VEOLIA").save(flush: true)
            new Firm(name: "VERBUND").save(flush: true)
            new Firm(name: "VIAG (see also ECSC.1321)").save(flush: true)
            new Firm(name: "VIENNA INSURANCE GROUP").save(flush: true)
            new Firm(name: "VIVENDI").save(flush: true)
            new Firm(name: "VODAFONE AIRTOUCH").save(flush: true)
            new Firm(name: "VOLVO").save(flush: true)
            new Firm(name: "VUELING").save(flush: true)
            new Firm(name: "VUP").save(flush: true)
            new Firm(name: "WALLENIUS LINES AB").save(flush: true)
            new Firm(name: "WARNER- LAMBERT").save(flush: true)
            new Firm(name: "WATSON WYATT").save(flush: true)
            new Firm(name: "WEGENER").save(flush: true)
            new Firm(name: "WELLA").save(flush: true)
            new Firm(name: "WESTINGHOUSE").save(flush: true)
            new Firm(name: "WILHELMSEN ASA").save(flush: true)
            new Firm(name: "WPP").save(flush: true)
            new Firm(name: "WYETH").save(flush: true)
            new Firm(name: "YARA").save(flush: true)
            new Firm(name: "YLE").save(flush: true)
            new Firm(name: "YTONG").save(flush: true)
            new Firm(name: "ZENTIVA").save(flush: true)
            new Firm(name: "ZEON").save(flush: true)
        }
    }
}
